home *** CD-ROM | disk | FTP | other *** search
- /* Renumber AREXX SCRIPT by Christoph Mayer */
-
- Signals On
- Options RESULTS
-
- Say "This scrip will renumber your sequence-pictures"
- Say ""
-
- /* getting parameters */
-
- Say 'Type old basename now (with path but without suffix):'
- Pull Basename
-
- Say 'Type new basename now (with path but without suffix):'
- Pull BasenameNew
-
- Say 'Type 3 for Suffix .xxx or 4 for Suffix .xxxx'
- Pull Suffixtype
-
- Say 'start number (old files):'
- Pull OldStart
-
- Say 'end number (old files):'
- Pull OldEnd
-
-
- Say 'Start number (where new sequence should begin):'
- Pull Newstart
-
-
- /* Renumber-loop */
-
- Address command
-
- Do i=OldStart by 1 to OldEnd
-
- Suffix3="."
- Suffix4="."
-
- if i<1000 Then Do
- Suffix3="."
- Suffix4=".0"
- end
-
- if i<100 Then Do
- Suffix3=".0"
- Suffix4=".00"
- end
-
- If i<10 Then Do
- Suffix3=".00"
- Suffix4=".000"
- end
-
-
- Suffix0=Suffix4
- If SuffixType=3 Then Do
- Suffix0=Suffix3
- end
-
- LeseName= Basename||Suffix0||i
- Speichname= BasenameNew||Suffix0||(i-OldStart+NewStart)
-
- Say 'renaming' Lesename 'as' Speichname
- 'Rename "'LeseName'" "'Speichname'"'
-
- END
-
- Say ""
- Say "Renumber program ended."
-
- RETURN
-